package wrap.pages;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * HealthTopics.java
 *
 * Created on Nov 21, 2009, 12:23:39 PM
 */

/**
 *
 * @author Lazlo
 */

import wrap.core.*;

public class Zodiac extends javax.swing.JPanel {

    String zodiac="";
    /** Creates new form HealthTopics */
    public Zodiac() {
        initComponents();



        String mn =(String)CC.getValues().get("Month");
         int dy = Integer.parseInt((String)CC.getValues().get("Day"));
        


        if(mn.equalsIgnoreCase("Jan") && dy < 20)
            zodiac="Capricon";
        else if(mn.equalsIgnoreCase("Jan") && dy >=20)
            zodiac="Aquarius";
        else if(mn.equalsIgnoreCase("Feb") && dy <19)
            zodiac="Aquarius";
        else if(mn.equalsIgnoreCase("Feb") && dy >=19)
            zodiac="Pisces";
        else if(mn.equalsIgnoreCase("Mar") && dy <21)
            zodiac="Aquarius";
        else if(mn.equalsIgnoreCase("Mar") && dy >=21)
            zodiac="Aries";
        else if(mn.equalsIgnoreCase("Apr") && dy <20)
            zodiac="Aries";
        else if(mn.equalsIgnoreCase("Apr") && dy >=20)
            zodiac="Taurus";
        else if(mn.equalsIgnoreCase("May") && dy <21)
            zodiac="Taurus";
        else if(mn.equalsIgnoreCase("May") && dy >=21)
            zodiac="Gemini";
        else if(mn.equalsIgnoreCase("Jun") && dy <21)
            zodiac="Gemini";
        else if(mn.equalsIgnoreCase("Jun") && dy >=21)
            zodiac="Cancer";
        else if(mn.equalsIgnoreCase("Jul") && dy <23)
            zodiac="Cancer";
        else if(mn.equalsIgnoreCase("Jul") && dy >=23)
            zodiac="Leo";
        else if(mn.equalsIgnoreCase("Aug") && dy <23)
            zodiac="Leo";
        else if(mn.equalsIgnoreCase("Aug") && dy >=23)
            zodiac="Virgo";
        else if(mn.equalsIgnoreCase("Sep") && dy <23)
            zodiac="Virgo";
        else if(mn.equalsIgnoreCase("Sep") && dy >=23)
            zodiac="Libra";
        else if(mn.equalsIgnoreCase("Oct") && dy <23)
            zodiac="Libra";
        else if(mn.equalsIgnoreCase("Oct") && dy >=23)
            zodiac="Scorpio";
        else if(mn.equalsIgnoreCase("Nov") && dy <22)
            zodiac="Scorpio";
        else if(mn.equalsIgnoreCase("Nov") && dy >=22)
            zodiac="Sagittarius";
        else if(mn.equalsIgnoreCase("Dec") && dy <22)
            zodiac="Sagittarius";
        else if(mn.equalsIgnoreCase("Dec") && dy >=22)
            zodiac="Capricon";

        System.out.print("Zodiac::" + zodiac);
        jLabel5.setText(zodiac);

        java.util.Map zodiacinfo = new java.util.HashMap<String,Object>();

        String[] aries = {"Aries is regarded as the most physical sign",
                            "You are aggressive",
                            "Aries people are 'doers' rather than 'talkers'",
                            "Aries people love challenges"
                        };

        String[] taurus = {"Underneath their cool, calm and collected exterior",
                            "Taureans manage to discreetly stay apart from the crowd",
                            "Most Taureans like their creature comforts ",
                            "Taureans are regarded as extremely sensual beings"
                        };

        String[] gemini = {"Terminally curious and sometimes even mischievous.",
                            "Geminis are multi-faceted souls. ",
                            "Geminis do lead very unique and unusual lives.",
                            "They love the adventure and game playing. "
                        };

        String[] cancer = {"Compassionate and caring with friends, family and lovers.",
                            "Endearingly eccentric on one hand, and on the other, insecure. ",
                            "Life doesn't stand still for this sign",
                            "Sign is one of the most magic of all"
                        };


        String[] leo = {"Leo's are born fortunate",
                            "Charismatic and positive-thinking",
                            "Totally devoted and faithful",
                            "All Leos are trendsetters, leaders and adventurers"
                        };

        String[] virgo = {"Creative and sensitive",
                            "Virgos are delicate people ",
                            "Virgos can often become victims of relationship power-games",
                            "Virgos are the most successful "
                        };


        String[] libra = {" Libra is considered a masculine.",
                            "You are intelligent and your strife and tussle is in the inner direction",
                            "You don’t possess the power to say ‘no’ ",
                            "You can be quite influential and tactful "
                        };

        String[] scorpio = {" You are the symbol of courage and power",
                            "Being a Scorpio, you are quite shrewd and astute ",
                            "You have a great stamina",
                            "You expect total loyalty and sincerity from your friends"
                        };

        String[] sagittarius = {" You are thought of as brave and foresighted individuals",
                            "You tend to be a little irresponsible ",
                            "You have an impeccable honesty",
                            "You have a huge self-respect"
                        };

        String[] capricon = {" You make your way to your destination ",
                            "You are quite systematic and have a tremendous verve ",
                            "You might also be restricted and misfortunes may come your way ",
                            "You are symbolic of authority and industriousness"
                        };

        String[] aquarius = {" You dispense knowledge, advice and even material possessions  ",
                            "You are the sign of brilliance and creativity",
                            "You are tolerant and don’t mind others poking fun at you",
                            "Aquarians are amiable, charming and intuitive"
                        };

        String[] pisces = {" Pisceans have a tendency to get pulled in two opposite directions",
                            "You have a particular artistic sophistication",
                            "You have a particular artistic sophistication",
                            "You share your resources with others"
                        };

        zodiacinfo.put("Aries", aries);
        zodiacinfo.put("Taurus", taurus);
        zodiacinfo.put("Gemini", gemini);
        zodiacinfo.put("Cancer", cancer);
        zodiacinfo.put("Pisces", pisces);
        zodiacinfo.put("Aquarius", aquarius);
        zodiacinfo.put("Capricon", capricon);
        zodiacinfo.put("Sagittarius", sagittarius);
        zodiacinfo.put("Scorpio", scorpio);
        zodiacinfo.put("Libra", libra);
        zodiacinfo.put("Virgo", virgo);
        zodiacinfo.put("Leo", leo);

//        test_printPath (aries);
//        test_printPath (taurus);
//        test_printPath (gemini);
//        test_printPath (cancer);
//        test_printPath (pisces);
//        test_printPath (aquarius);
//        test_printPath (capricon);
//        test_printPath (sagittarius);
//        test_printPath (scorpio);
//        test_printPath (libra);
//        test_printPath (virgo);
//        test_printPath (leo);

        String[] text =(String[])zodiacinfo.get(zodiac);
               jLabel7.setText(text[0]);
        jLabel8.setText(text[1]);
        jLabel9.setText(text[2]);
        jLabel10.setText(text[3]);


    }



    public String getSoundName(){
        return "zodiac/" + String.valueOf(zodiac);
    }

    private void test_printPath (String[] path){
        System.out.println();
        System.out.println("ZODIAC:");
        for(int i = 0; i < path.length; i++){
            System.out.print(path[i]);
        }
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jButton3 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        jPanel8 = new javax.swing.JPanel();
        jButton2 = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jButton1 = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jPanel6 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jPanel7 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();

        setLayout(new java.awt.BorderLayout());

        jPanel1.setLayout(new java.awt.BorderLayout());

        jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/wrap/sounds/sound.png"))); // NOI18N
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });
        jPanel1.add(jButton3, java.awt.BorderLayout.LINE_END);

        jButton4.setText("Back");
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });
        jPanel1.add(jButton4, java.awt.BorderLayout.LINE_START);

        jPanel8.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 0, 15));

        jButton2.setText("Show All Topics");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });
        jPanel8.add(jButton2);

        jPanel1.add(jPanel8, java.awt.BorderLayout.CENTER);

        add(jPanel1, java.awt.BorderLayout.PAGE_START);

        jButton1.setText("Back to topic selection");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        jPanel2.add(jButton1);

        add(jPanel2, java.awt.BorderLayout.PAGE_END);

        jPanel3.setLayout(new java.awt.BorderLayout());

        jPanel4.setLayout(new java.awt.BorderLayout());

        jLabel1.setText("                   ");
        jPanel5.add(jLabel1);

        jPanel4.add(jPanel5, java.awt.BorderLayout.LINE_END);

        jLabel2.setText("               ");
        jPanel6.add(jLabel2);

        jPanel4.add(jPanel6, java.awt.BorderLayout.LINE_START);

        jPanel7.setLayout(new java.awt.GridLayout(10, 0));

        jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel3.setText("ZODIAC");
        jPanel7.add(jLabel3);
        jPanel7.add(jLabel4);

        jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jPanel7.add(jLabel5);

        jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jPanel7.add(jLabel6);

        jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jPanel7.add(jLabel7);

        jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jPanel7.add(jLabel8);

        jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jPanel7.add(jLabel9);

        jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jPanel7.add(jLabel10);

        jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jPanel7.add(jLabel11);

        jLabel12.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jPanel7.add(jLabel12);

        jPanel4.add(jPanel7, java.awt.BorderLayout.CENTER);

        jPanel3.add(jPanel4, java.awt.BorderLayout.CENTER);

        add(jPanel3, java.awt.BorderLayout.CENTER);
    }// </editor-fold>//GEN-END:initComponents

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        // TODO add your handling code here:
        CC.back();
    }//GEN-LAST:event_jButton4ActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        // TODO add your handling code here:
        //Sound
        CC.playPageSound();
    }//GEN-LAST:event_jButton3ActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        CC.to("Topic");
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        CC.to("Contents");
}//GEN-LAST:event_jButton2ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    // End of variables declaration//GEN-END:variables

}
